package com.beiding.codecreater.utils;

import java.util.Collection;
import java.util.Map;

public class ContentUtils {

    public static boolean isEmpty(Object o) {
        if (o instanceof String) {
            return "".equals(o);
        } else if (o instanceof Collection) {
            return ((Collection) o).size() == 0;
        } else if (o instanceof Map) {
            return ((Map) o).size() == 0;
        } else if (o instanceof Object[]) {
            return ((Object[]) o).length == 0;
        }
        return o == null;
    }


}
